home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QuickTimeVRFormat.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  13.5 KB  |  410 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QuickTimeVRFormat.p
  3.  
  4.      Contains:    QuickTime VR interfaces
  5.  
  6.      Version:    Technology:    QuickTime VR 2.1
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT QuickTimeVRFormat;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __QUICKTIMEVRFORMAT__}
  28. {$SETC __QUICKTIMEVRFORMAT__ := 1}
  29.  
  30. {$I+}
  31. {$SETC QuickTimeVRFormatIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __DIALOGS__}
  38. {$I Dialogs.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __MOVIES__}
  41. {$I Movies.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __QUICKTIMEVR__}
  44. {$I QuickTimeVR.p}
  45. {$ENDC}
  46.  
  47.  
  48. {$PUSH}
  49. {$ALIGN MAC68K}
  50. {$LibExport+}
  51.  
  52. {  User data type for the Movie Controller type specifier }
  53.  
  54. CONST
  55.     kQTControllerType            = 'ctyp';                        {  Atom & ID of where our }
  56.     kQTControllerID                = 1;                            {  ...controller name is stored }
  57.  
  58. {  VRWorld atom types }
  59.     kQTVRWorldHeaderAtomType    = 'vrsc';
  60.     kQTVRImagingParentAtomType    = 'imgp';
  61.     kQTVRPanoImagingAtomType    = 'impn';
  62.     kQTVRObjectImagingAtomType    = 'imob';
  63.     kQTVRNodeParentAtomType        = 'vrnp';
  64.     kQTVRNodeIDAtomType            = 'vrni';
  65.     kQTVRNodeLocationAtomType    = 'nloc';
  66.     kQTVRCursorParentAtomType    = 'vrcp';                        {  New with 2.1 }
  67.     kQTVRCursorAtomType            = 'CURS';                        {  New with 2.1 }
  68.     kQTVRColorCursorAtomType    = 'crsr';                        {  New with 2.1 }
  69.  
  70. {  NodeInfo atom types }
  71.     kQTVRNodeHeaderAtomType        = 'ndhd';
  72.     kQTVRHotSpotParentAtomType    = 'hspa';
  73.     kQTVRHotSpotAtomType        = 'hots';
  74.     kQTVRHotSpotInfoAtomType    = 'hsin';
  75.     kQTVRLinkInfoAtomType        = 'link';
  76.  
  77. {  Miscellaneous atom types }
  78.     kQTVRStringAtomType            = 'vrsg';
  79.     kQTVRStringEncodingAtomType    = 'vrse';                        {  New with 2.1 }
  80.     kQTVRPanoSampleDataAtomType    = 'pdat';
  81.     kQTVRObjectInfoAtomType        = 'obji';
  82.     kQTVRImageTrackRefAtomType    = 'imtr';                        {  Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format. }
  83.     kQTVRHotSpotTrackRefAtomType = 'hstr';                        {  Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format. }
  84.     kQTVRAngleRangeAtomType        = 'arng';
  85.     kQTVRTrackRefArrayAtomType    = 'tref';
  86.     kQTVRPanConstraintAtomType    = 'pcon';
  87.     kQTVRTiltConstraintAtomType    = 'tcon';
  88.     kQTVRFOVConstraintAtomType    = 'fcon';
  89.  
  90.     kQTVRObjectInfoAtomID        = 1;
  91.     kQTVRObjectImageTrackRefAtomID = 1;                            {  New with 2.1, it adds a track reference to select between multiple image tracks }
  92.     kQTVRObjectHotSpotTrackRefAtomID = 1;                        {  New with 2.1, it adds a track reference to select between multiple hotspot tracks }
  93.  
  94. {  Track reference types }
  95.     kQTVRImageTrackRefType        = 'imgt';
  96.     kQTVRHotSpotTrackRefType    = 'hott';
  97.  
  98. {  Old hot spot types }
  99.     kQTVRHotSpotNavigableType    = 'navg';
  100.  
  101. {  Valid bits used in QTVRLinkHotSpotAtom }
  102.     kQTVRValidPan                = $00000001;
  103.     kQTVRValidTilt                = $00000002;
  104.     kQTVRValidFOV                = $00000004;
  105.     kQTVRValidViewCenter        = $00000008;
  106.  
  107.  
  108. {  Values for flags field in QTVRPanoSampleAtom }
  109.     kQTVRPanoFlagHorizontal        = $00000001;
  110.     kQTVRPanoFlagLast            = $80000000;
  111.  
  112.  
  113. {  Values for locationFlags field in QTVRNodeLocationAtom }
  114.     kQTVRSameFile                = 0;
  115.  
  116.  
  117. {  Header for QTVR track's Sample Description record (vrWorld atom container is appended) }
  118.  
  119. TYPE
  120.     QTVRSampleDescriptionPtr = ^QTVRSampleDescription;
  121.     QTVRSampleDescription = RECORD
  122.         descSize:                UInt32;                                    {  total size of the QTVRSampleDescription }
  123.         descType:                UInt32;                                    {  must be 'qtvr' }
  124.         reserved1:                UInt32;                                    {  must be zero }
  125.         reserved2:                UInt16;                                    {  must be zero }
  126.         dataRefIndex:            UInt16;                                    {  must be zero }
  127.         data:                    UInt32;                                    {  Will be extended to hold vrWorld QTAtomContainer }
  128.     END;
  129.  
  130.     QTVRSampleDescriptionHandle            = ^QTVRSampleDescriptionPtr;
  131. {
  132.   =================================================================================================
  133.    Definitions and structures used in the VRWorld QTAtomContainer
  134.   -------------------------------------------------------------------------------------------------
  135. }
  136.  
  137.     QTVRStringAtomPtr = ^QTVRStringAtom;
  138.     QTVRStringAtom = RECORD
  139.         stringUsage:            UInt16;
  140.         stringLength:            UInt16;
  141.         theString:                PACKED ARRAY [0..3] OF UInt8;            {  field previously named "string" }
  142.     END;
  143.  
  144.  
  145.     QTVRWorldHeaderAtomPtr = ^QTVRWorldHeaderAtom;
  146.     QTVRWorldHeaderAtom = RECORD
  147.         majorVersion:            UInt16;
  148.         minorVersion:            UInt16;
  149.         nameAtomID:                QTAtomID;
  150.         defaultNodeID:            UInt32;
  151.         vrWorldFlags:            UInt32;
  152.         reserved1:                UInt32;
  153.         reserved2:                UInt32;
  154.     END;
  155.  
  156.  
  157. {  Valid bits used in QTVRPanoImagingAtom }
  158.  
  159. CONST
  160.     kQTVRValidCorrection        = $00000001;
  161.     kQTVRValidQuality            = $00000002;
  162.     kQTVRValidDirectDraw        = $00000004;
  163.     kQTVRValidFirstExtraProperty = $00000008;
  164.  
  165.  
  166. TYPE
  167.     QTVRPanoImagingAtomPtr = ^QTVRPanoImagingAtom;
  168.     QTVRPanoImagingAtom = RECORD
  169.         majorVersion:            UInt16;
  170.         minorVersion:            UInt16;
  171.         imagingMode:            UInt32;
  172.         imagingValidFlags:        UInt32;
  173.         correction:                UInt32;
  174.         quality:                UInt32;
  175.         directDraw:                UInt32;
  176.         imagingProperties:        ARRAY [0..5] OF UInt32;                    {  for future properties }
  177.         reserved1:                UInt32;
  178.         reserved2:                UInt32;
  179.     END;
  180.  
  181.     QTVRNodeLocationAtomPtr = ^QTVRNodeLocationAtom;
  182.     QTVRNodeLocationAtom = RECORD
  183.         majorVersion:            UInt16;
  184.         minorVersion:            UInt16;
  185.         nodeType:                OSType;
  186.         locationFlags:            UInt32;
  187.         locationData:            UInt32;
  188.         reserved1:                UInt32;
  189.         reserved2:                UInt32;
  190.     END;
  191.  
  192. {
  193.   =================================================================================================
  194.    Definitions and structures used in the Nodeinfo QTAtomContainer
  195.   -------------------------------------------------------------------------------------------------
  196. }
  197.  
  198.     QTVRNodeHeaderAtomPtr = ^QTVRNodeHeaderAtom;
  199.     QTVRNodeHeaderAtom = RECORD
  200.         majorVersion:            UInt16;
  201.         minorVersion:            UInt16;
  202.         nodeType:                OSType;
  203.         nodeID:                    QTAtomID;
  204.         nameAtomID:                QTAtomID;
  205.         commentAtomID:            QTAtomID;
  206.         reserved1:                UInt32;
  207.         reserved2:                UInt32;
  208.     END;
  209.  
  210.     QTVRAngleRangeAtomPtr = ^QTVRAngleRangeAtom;
  211.     QTVRAngleRangeAtom = RECORD
  212.         minimumAngle:            Float32;
  213.         maximumAngle:            Float32;
  214.     END;
  215.  
  216.     QTVRHotSpotInfoAtomPtr = ^QTVRHotSpotInfoAtom;
  217.     QTVRHotSpotInfoAtom = RECORD
  218.         majorVersion:            UInt16;
  219.         minorVersion:            UInt16;
  220.         hotSpotType:            OSType;
  221.         nameAtomID:                QTAtomID;
  222.         commentAtomID:            QTAtomID;
  223.         cursorID:                ARRAY [0..2] OF SInt32;
  224.                                                                         {  canonical view for this hot spot }
  225.         bestPan:                Float32;
  226.         bestTilt:                Float32;
  227.         bestFOV:                Float32;
  228.         bestViewCenter:            QTVRFloatPoint;
  229.                                                                         {  Bounding box for this hot spot }
  230.         hotSpotRect:            Rect;
  231.         flags:                    UInt32;
  232.         reserved1:                UInt32;
  233.         reserved2:                UInt32;
  234.     END;
  235.  
  236.     QTVRLinkHotSpotAtomPtr = ^QTVRLinkHotSpotAtom;
  237.     QTVRLinkHotSpotAtom = RECORD
  238.         majorVersion:            UInt16;
  239.         minorVersion:            UInt16;
  240.         toNodeID:                UInt32;
  241.         fromValidFlags:            UInt32;
  242.         fromPan:                Float32;
  243.         fromTilt:                Float32;
  244.         fromFOV:                Float32;
  245.         fromViewCenter:            QTVRFloatPoint;
  246.         toValidFlags:            UInt32;
  247.         toPan:                    Float32;
  248.         toTilt:                    Float32;
  249.         toFOV:                    Float32;
  250.         toViewCenter:            QTVRFloatPoint;
  251.         distance:                Float32;
  252.         flags:                    UInt32;
  253.         reserved1:                UInt32;
  254.         reserved2:                UInt32;
  255.     END;
  256.  
  257. {
  258.   =================================================================================================
  259.    Definitions and structures used in Panorama and Object tracks
  260.   -------------------------------------------------------------------------------------------------
  261. }
  262.  
  263.     QTVRPanoSampleAtomPtr = ^QTVRPanoSampleAtom;
  264.     QTVRPanoSampleAtom = RECORD
  265.         majorVersion:            UInt16;
  266.         minorVersion:            UInt16;
  267.         imageRefTrackIndex:        UInt32;                                    {  track reference index of the full res image track }
  268.         hotSpotRefTrackIndex:    UInt32;                                    {  track reference index of the full res hot spot track }
  269.         minPan:                    Float32;
  270.         maxPan:                    Float32;
  271.         minTilt:                Float32;
  272.         maxTilt:                Float32;
  273.         minFieldOfView:            Float32;
  274.         maxFieldOfView:            Float32;
  275.         defaultPan:                Float32;
  276.         defaultTilt:            Float32;
  277.         defaultFieldOfView:        Float32;
  278.                                                                         {  Info for highest res version of image track }
  279.         imageSizeX:                UInt32;                                    {  pixel width of the panorama (e.g. 768) }
  280.         imageSizeY:                UInt32;                                    {  pixel height of the panorama (e.g. 2496) }
  281.         imageNumFramesX:        UInt16;                                    {  diced frames wide (e.g. 1) }
  282.         imageNumFramesY:        UInt16;                                    {  diced frames high (e.g. 24) }
  283.                                                                         {  Info for highest res version of hotSpot track }
  284.         hotSpotSizeX:            UInt32;                                    {  pixel width of the hot spot panorama (e.g. 768) }
  285.         hotSpotSizeY:            UInt32;                                    {  pixel height of the hot spot panorama (e.g. 2496) }
  286.         hotSpotNumFramesX:        UInt16;                                    {  diced frames wide (e.g. 1) }
  287.         hotSpotNumFramesY:        UInt16;                                    {  diced frames high (e.g. 24) }
  288.         flags:                    UInt32;
  289.         reserved1:                UInt32;
  290.         reserved2:                UInt32;
  291.     END;
  292.  
  293. {  Special resolution values for the Image Track Reference Atoms. Use only one value per track reference. }
  294.  
  295. CONST
  296.     kQTVRFullTrackRes            = $00000001;
  297.     kQTVRHalfTrackRes            = $00000002;
  298.     kQTVRQuarterTrackRes        = $00000004;
  299.     kQTVRPreviewTrackRes        = $8000;
  300.  
  301.  
  302. TYPE
  303.     QTVRTrackRefEntryPtr = ^QTVRTrackRefEntry;
  304.     QTVRTrackRefEntry = RECORD
  305.         trackRefType:            UInt32;
  306.         trackResolution:        UInt16;
  307.         trackRefIndex:            UInt32;
  308.     END;
  309.  
  310. {
  311.   =================================================================================================
  312.    Object File format 2.0
  313.   -------------------------------------------------------------------------------------------------
  314. }
  315.  
  316. CONST
  317.     kQTVRObjectAnimateViewFramesOn = $00000001;
  318.     kQTVRObjectPalindromeViewFramesOn = $00000002;
  319.     kQTVRObjectStartFirstViewFrameOn = $00000004;
  320.     kQTVRObjectAnimateViewsOn    = $00000008;
  321.     kQTVRObjectPalindromeViewsOn = $00000010;
  322.     kQTVRObjectSyncViewToFrameRate = $00000020;
  323.     kQTVRObjectDontLoopViewFramesOn = $00000040;
  324.     kQTVRObjectPlayEveryViewFrameOn = $00000080;
  325.     kQTVRObjectStreamingViewsOn    = $00000100;
  326.  
  327.     kQTVRObjectWrapPanOn        = $00000001;
  328.     kQTVRObjectWrapTiltOn        = $00000002;
  329.     kQTVRObjectCanZoomOn        = $00000004;
  330.     kQTVRObjectReverseHControlOn = $00000008;
  331.     kQTVRObjectReverseVControlOn = $00000010;
  332.     kQTVRObjectSwapHVControlOn    = $00000020;
  333.     kQTVRObjectTranslationOn    = $00000040;
  334.  
  335.     kGrabberScrollerUI            = 1;                            {  "Object"  }
  336.     kOldJoyStickUI                = 2;                            {   "1.0 Object as Scene"      }
  337.     kJoystickUI                    = 3;                            {  "Object In Scene" }
  338.     kGrabberUI                    = 4;                            {  "Grabber only" }
  339.     kAbsoluteUI                    = 5;                            {  "Absolute pointer" }
  340.  
  341.  
  342.  
  343. TYPE
  344.     QTVRObjectSampleAtomPtr = ^QTVRObjectSampleAtom;
  345.     QTVRObjectSampleAtom = RECORD
  346.         majorVersion:            UInt16;                                    {  kQTVRMajorVersion }
  347.         minorVersion:            UInt16;                                    {  kQTVRMinorVersion }
  348.         movieType:                UInt16;                                    {  ObjectUITypes }
  349.         viewStateCount:            UInt16;                                    {  The number of view states 1 based }
  350.         defaultViewState:        UInt16;                                    {  The default view state number. The number must be 1 to viewStateCount }
  351.         mouseDownViewState:        UInt16;                                    {  The mouse down view state.   The number must be 1 to viewStateCount }
  352.         viewDuration:            UInt32;                                    {  The duration of each view including all animation frames in a view }
  353.         columns:                UInt32;                                    {  Number of columns in movie }
  354.         rows:                    UInt32;                                    {  Number rows in movie }
  355.         mouseMotionScale:        Float32;                                {  180.0 for kStandardObject or kQTVRObjectInScene, actual degrees for kOldNavigableMovieScene. }
  356.         minPan:                    Float32;                                {  Start   horizontal pan angle in degrees }
  357.         maxPan:                    Float32;                                {  End     horizontal pan angle in degrees }
  358.         defaultPan:                Float32;                                {  Initial horizontal pan angle in degrees (poster view) }
  359.         minTilt:                Float32;                                {  Start   vertical   pan angle in degrees }
  360.         maxTilt:                Float32;                                {  End     vertical   pan angle in degrees }
  361.         defaultTilt:            Float32;                                {  Initial vertical   pan angle in degrees (poster view)     }
  362.         minFieldOfView:            Float32;                                {  minimum field of view setting (appears as the maximum zoom effect) must be >= 1 }
  363.         fieldOfView:            Float32;                                {  the field of view range must be >= 1 }
  364.         defaultFieldOfView:        Float32;                                {  must be in minFieldOfView and maxFieldOfView range inclusive }
  365.         defaultViewCenterH:        Float32;
  366.         defaultViewCenterV:        Float32;
  367.         viewRate:                Float32;
  368.         frameRate:                Float32;
  369.         animationSettings:        UInt32;                                    {  32 reserved bit fields }
  370.         controlSettings:        UInt32;                                    {  32 reserved bit fields }
  371.     END;
  372.  
  373. {$IFC OLDROUTINENAMES }
  374.     VRStringAtom                        = QTVRStringAtom;
  375.     VRStringAtomPtr                     = ^VRStringAtom;
  376.     VRWorldHeaderAtom                    = QTVRWorldHeaderAtom;
  377.     VRWorldHeaderAtomPtr                 = ^VRWorldHeaderAtom;
  378.     VRPanoImagingAtom                    = QTVRPanoImagingAtom;
  379.     VRPanoImagingAtomPtr                 = ^VRPanoImagingAtom;
  380.     VRNodeLocationAtom                    = QTVRNodeLocationAtom;
  381.     VRNodeLocationAtomPtr                 = ^VRNodeLocationAtom;
  382.     VRNodeHeaderAtom                    = QTVRNodeHeaderAtom;
  383.     VRNodeHeaderAtomPtr                 = ^VRNodeHeaderAtom;
  384.     VRAngleRangeAtom                    = QTVRAngleRangeAtom;
  385.     VRAngleRangeAtomPtr                 = ^VRAngleRangeAtom;
  386.     VRHotSpotInfoAtom                    = QTVRHotSpotInfoAtom;
  387.     VRHotSpotInfoAtomPtr                 = ^VRHotSpotInfoAtom;
  388.     VRLinkHotSpotAtom                    = QTVRLinkHotSpotAtom;
  389.     VRLinkHotSpotAtomPtr                 = ^VRLinkHotSpotAtom;
  390.     VRPanoSampleAtom                    = QTVRPanoSampleAtom;
  391.     VRPanoSampleAtomPtr                 = ^VRPanoSampleAtom;
  392.     VRTrackRefEntry                        = QTVRTrackRefEntry;
  393.     VRTrackRefEntryPtr                     = ^VRTrackRefEntry;
  394.     VRObjectSampleAtom                    = QTVRObjectSampleAtom;
  395.     VRObjectSampleAtomPtr                 = ^VRObjectSampleAtom;
  396. {$ENDC}  {OLDROUTINENAMES}
  397.  
  398.  
  399.  
  400. {$ALIGN RESET}
  401. {$POP}
  402.  
  403. {$SETC UsingIncludes := QuickTimeVRFormatIncludes}
  404.  
  405. {$ENDC} {__QUICKTIMEVRFORMAT__}
  406.  
  407. {$IFC NOT UsingIncludes}
  408.  END.
  409. {$ENDC}
  410.